package com.cqrt.constant;

import com.hustcad.plm.pdm.common.model.dto.search.SearchTypeDTO;
import com.ty.basic.constant.TableTypeConstrant;
import com.ty.ppm.model.utils.Tools;
import java.time.format.DateTimeFormatter;
import java.util.HashMap;
import java.util.Map;


public class RTPlmConstant {

    public static final String PUSH_MODE = "pushMode";
    public static final String DEVELOPMENT_LEVEL = "developmentLevel";
    public static final String DEVELOPMENT_MODE = "developmentMode";
    public static final String PLAN_TYPE = "ty.projectmng.admin.CTyPlan";
    public static final String SUBMIT = "立即提交";
    public static final String REQUIRED = "是否必须";
    public static final String ANYSUBMISSION = "任一提交";
    public static final String OK = "是";
    public static final String NO = "否";
    public static final String DEVELOPMENLEVEL= "开发等级";
    public static final String OUT = "OUT";
    public static final String INPUT = "INPUT";
    public static final String TEMPLATE_STATE_DRAFT = "草稿";
    public static final String TEMPLATE_STATE_EFFECTIVE = "生效";
    public static final String TEMPLATE_STATE_INVALID = "失效";
    public static final Map<String, String> PROJECT_IBA_GROUP = new HashMap<>();
    public static final String INITIAL_PLAN = "初始计划";
    public static final DateTimeFormatter DATE_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd");
    public static final DateTimeFormatter DATETIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
    private static final Map<String, SearchTypeDTO> searchTypeDTOMap = new HashMap<>();
    public static final Map<String, String> statusMap = new HashMap<>();
    public static final String ZERO = "0";
    public static final String PROJECTPHASE = "ProjectPhase";
    public static final String EXECUTIONSTATUS = "ExecutionStatus";


    private RTPlmConstant() {
    }

    static {
        PROJECT_IBA_GROUP.put("常规", "Convention");
        PROJECT_IBA_GROUP.put("快开", "QuickOpen");
        SearchTypeDTO projectTypeDTO = new SearchTypeDTO();
        projectTypeDTO.setTypeOid(Tools.toBigInteger("327175971096821760"));
        projectTypeDTO.setTypeInthid(TableTypeConstrant.TY_PROJECT_TYPE);
        searchTypeDTOMap.put("PROJECT_TYPE", projectTypeDTO);
        SearchTypeDTO planTypeDTO = new SearchTypeDTO();
        planTypeDTO.setTypeOid(Tools.toBigInteger("327176006605799424"));
        planTypeDTO.setTypeInthid(RTPlmConstant.PLAN_TYPE);
        searchTypeDTOMap.put("PLAN_TYPE", planTypeDTO);
        statusMap.put("0",TEMPLATE_STATE_DRAFT);
        statusMap.put("1",TEMPLATE_STATE_INVALID);
        statusMap.put("2",TEMPLATE_STATE_EFFECTIVE);

    }

    public static SearchTypeDTO getSearchTypeDTO(String typeKey) {
        return searchTypeDTOMap.get(typeKey);
    }
}
